package dominion;

import java.util.EnumSet;
import java.util.Set;

public enum CardTypes {
	// Victory
	Estate, Duchy, Garden, Province, Curse,
	// Tresure
	Copper, Silver, Gold,
	// Kingdom
	// +Actions
	Village, Market, Festival,
	// +Cards
	Moat, Smithy, CouncilRoom,
	// Attack
	Witch, Bureaucrat, Militia, Thief,
	// Trash
	Chapel, Remodel,
	// Other
	Adventurer, Workshop;

	public static final Set<CardTypes> Victories = EnumSet.range(Estate,
			Province);

	public static final Set<CardTypes> Tresures = EnumSet.of(Copper, Silver,
			Gold);
	public static final Set<CardTypes> Kingdoms = EnumSet.range(Village,
			Workshop);

	public static boolean isVictory(Card c) {
		return c != null && Victories.contains(c.getType());
	}

	public static boolean isTresure(Card c) {
		return c != null && Tresures.contains(c.getType());
	}

	public static boolean isKingdom(Card c) {
		return c != null && Kingdoms.contains(c.getType());
	}
}
